﻿<?xml version="1.0" encoding="utf-8" ?>
<SourceAnalyzer Name="Naming Rules">
  <Description>
    Rules which enforce naming requirements for members, types, and variables.
  </Description>
  <Properties>
    <CollectionProperty
      Name="Hungarian"
      Aggregate="True"
      FriendlyName="Valid prefixes"
      Description="The list of allowed prefixes for variable and field names.">
    </CollectionProperty>
  </Properties>
  <Rules>
    <Rule Name="ElementMustBeginWithUpperCaseLetter" CheckId="SA1300">
      <Context>{0} names begin with an upper-case letter: {1}.</Context>
      <Description>Validates that names of certain types of elements begin with an upper-case letter.</Description>
    </Rule>
    <Rule Name="ElementMustBeginWithLowerCaseLetter" CheckId="SA1301">
      <Context>{0} names must start with a lower-case letter: {1}.</Context>
      <Description>Validates that names of certain types of elements begin with a lower-case letter.</Description>
    </Rule>
    <Rule Name="InterfaceNamesMustBeginWithI" CheckId="SA1302">
      <Context>Interface names must start with the capital letter 'I': {0}.</Context>
      <Description>Validates that the name of an interface begins with the capital letter 'I'.</Description>
    </Rule>
    <Rule Name="ConstFieldNamesMustBeginWithUpperCaseLetter" CheckId="SA1303">
      <Context>Constants must start with an upper-case letter: {0}.</Context>
      <Description>Validates that the name of a constant begins with an upper-case letter.</Description>
    </Rule>
    <Rule Name="NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter" CheckId="SA1304">
      <Context>Readonly variables that are not declared private must start with an upper-case letter: {0}.</Context>
      <Description>Validates that the name of a non-private readonly field begins with an upper-case letter.</Description>
    </Rule>
    <Rule Name="FieldNamesMustNotUseHungarianNotation" CheckId="SA1305">
      <Context>The variable name '{0}' begins with a prefix that looks like Hungarian notation. Remove the prefix or add it to the list of allowed prefixes.</Context>
      <Description>Validates that a variable name is not prepended with lower-case characters matching the signature of Hungarian notation.</Description>
    </Rule>
    <Rule Name="FieldNamesMustBeginWithLowerCaseLetter" CheckId="SA1306">
      <Context>Variable names and private field names must start with a lower-case letter: {0}.</Context>
      <Description>Validates that the name of a variable or field begins with a lower-case letter.</Description>
    </Rule>
    <Rule Name="AccessibleFieldsMustBeginWithUpperCaseLetter" CheckId="SA1307">
      <Context>Public and internal fields must start with an upper-case letter: {0}.</Context>
      <Description>Validates that the name of a public or internal field must begin with an upper-case letter.</Description>
    </Rule>
    <Rule Name="VariableNamesMustNotBePrefixed" CheckId="SA1308">
      <Context>Variable names must not start with 'm_' or 's_'.</Context>
      <Description>Validates that the name of a member variable does not begin with the 'm_' or '_s' syntax.</Description>
    </Rule>
    <Rule Name="FieldNamesMustNotBeginWithUnderscore" CheckId="SA1309">
      <Context>Field names must not start with an underscore.</Context>
      <Description>Validates that the name of a field does not begin with an underscore.</Description>
    </Rule>
    <Rule Name="FieldNamesMustNotContainUnderscore" CheckId="SA1310">
      <Context>Field names must not contain underscores.</Context>
      <Description>Validates that the name of a field does not contain underscores.</Description>
    </Rule>
    <Rule Name="StaticReadonlyFieldsMustBeginWithUpperCaseLetter" CheckId="SA1311">
      <Context>Static readonly fields must start with an upper-case letter: {0}.</Context>
      <Description>Validates that the name of a static readonly field begins with an upper-case letter.</Description>
    </Rule>
  </Rules>
</SourceAnalyzer>

